﻿@model ScrumTracker.Models.Sprint
@section head{
<script>
    var test = 1;
</script>
}
@using (Html.BeginForm("Create", "Sprints", FormMethod.Post, new { ajax = 1 }))
{
    <fieldset>
        <legend>Sprint</legend>
        @*<div class="editor-label">
            @Html.LabelFor(model => model.ProductId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ProductId)
            @Html.ValidationMessageFor(model => model.ProductId)
        </div>*@
        @Html.HiddenFor(m => m.ProductId)
        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.EndDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.EndDate)
            @Html.ValidationMessageFor(model => model.EndDate)
        </div>
        @*<div class="editor-label">
            @Html.LabelFor(model => model.CreatedAt)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CreatedAt)
            @Html.ValidationMessageFor(model => model.CreatedAt)
        </div>*@
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
@*<div>
    @Html.ActionLink("Back to List", "Index")
</div>
*@ @*@using (Ajax.BeginForm("Create", "Sprints", new { @id = Model.ProductId }, new AjaxOptions() { OnSuccess = "createSprintSuccess" }))
{
    <div class="editor-label">
        @Html.LabelFor(model => model.ProductId)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.ProductId)
        @Html.ValidationMessageFor(model => model.ProductId)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Name)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Name)
        @Html.ValidationMessageFor(model => model.Name)
    </div>
    <p>
        <input type="submit" value="Create" />
    </p>
}*@